Open source projects such as Linux typically involve integration of multiple pieces of source code called upstream sources that are generated by an open source project. These sources (sometimes referred to as a pristine source) are then modified by a set of patch files provided by a distributor. The patch files provide corrections to fix bugs, apply an individual feature, etc. If a developer then wants to make further changes, the changes are made to the patched code. Once changes are made, the patched file is saved and the origin of the individual patches is lost. Sometimes a new patch file does not apply cleanly to a given pristine source or current collection of patch files, e.g., due to creating the patch file against a slightly different source tree. The process of resolving these problems can often require tedious work in rearranging the patch order, manually fixing the patch paragraph (also known as hunk) offsets, etc. In addition, this process is prone to error and may lead to loss of information if the original offsets become relevant later.